package net.zdreamer.shunyi.adapter;

import android.content.Context;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import net.zdreamer.shunyi.R;
import net.zdreamer.shunyi.utils.ImageUtil;
import net.zdreamer.shunyi.utils.ListUtils.CommentInfos;
import net.zdreamer.shunyi.utils.ViewHolder;

import java.util.List;

/**
 * Created by Admin on 2015/1/9.
 */
public class CommentAdapter extends MyBaseAdapter<CommentInfos.CommentInfo> {

    private ImageView itemphoto;
    private Context context;
    public CommentAdapter(Context context, List<CommentInfos.CommentInfo> list, int res) {
        super(context, list, res);
        this.context=context;
    }

    @Override
    protected View getView(int position, View convertView, ViewGroup parent, CommentInfos.CommentInfo value) {
       itemphoto=(ImageView) ViewHolder.get(convertView,R.id.comment_photo);
        itemphoto.setImageBitmap(ImageUtil.toRoundBitmap(context, R.drawable.guangchangphoto));
        return convertView;
    }
}
